package com.wwb.w0512;

import androidx.appcompat.app.AppCompatActivity;

import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import android.os.Bundle;

public class MainActivity extends AppCompatActivity {
    private FragmentManager manager;
    private FragmentTransaction beginTransaction;

    private String[] settingText={
            "北京，高等教育集中地\n"+
                    "20191415123武文博",
            "上海，繁华金融中心",
            "无锡，太湖之光，引领未来"

    };


    private int[] settingicons={R.drawable.bj,R.drawable.sh,R.drawable.wx};
    private String[] citynames={"北京","上海","无锡"};

    public String[] getSettingText() {
        return settingText;
    }


    public int[] getIcons() {
        return settingicons;
    }


    public String[] getCitynames() {
        return citynames;
    }



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ContentFragment contentFragment=new ContentFragment();
        MenuFragment menuFragment=new MenuFragment();

        manager=getSupportFragmentManager();
        beginTransaction=manager.beginTransaction();
        beginTransaction.replace(R.id.citycontent,contentFragment);
        beginTransaction.replace(R.id.menu,menuFragment);
        beginTransaction.commit();

    }
}